Skip to content

Conversation

@Sangminnn
Copy link
Collaborator

@Sangminnn Sangminnn commented Oct 18, 2024

Overview

Issue: #450

객체에서 조건에 부합하는 마지막 key를 반환합니다.

PR Checklist

  • All tests pass.
  • All type checks pass.
  • I have read the Contributing Guide document.
    Contributing Guide

@Sangminnn Sangminnn self-assigned this Oct 18, 2024
@Sangminnn Sangminnn requested a review from ssi02014 as a code owner October 18, 2024 14:09
@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2024

🦋 Changeset detected

Latest commit: c8f9926

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@modern-kit/utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Sangminnn Sangminnn added feature 새로운 기능 추가 @modern-kit/utils @modern-kit/utils labels Oct 18, 2024
condition: (value: T[keyof T]) => boolean,
): string | undefined {
const keys = Object.keys(obj);

Copy link
Collaborator Author

@Sangminnn Sangminnn Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverse 함수를 사용할 경우 불필요하게 한번 더 순회하여 성능적 이점을 가지고가기 위해 아래의 방식을 사용했습니다.

실제 reverse 함수를 사용했을때보다 실제로 성능적 이점이 있는 부분을 확인했습니다.

reverse 사용 O

스크린샷 2024-10-18 오후 11 13 06

reverse 사용 X

스크린샷 2024-10-18 오후 11 13 57

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sangminnn 좋습니다 :) 👍

@codecov
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.60%. Comparing base (33cf068) to head (c8f9926).
Report is 31 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #514      +/-   ##
==========================================
+ Coverage   97.41%   97.60%   +0.18%     
==========================================
  Files         164      173       +9     
  Lines        1470     1542      +72     
  Branches      361      387      +26     
==========================================
+ Hits         1432     1505      +73     
+ Misses         34       33       -1     
  Partials        4        4              
Components Coverage Δ
@modern-kit/react 95.58% <92.30%> (+0.37%) ⬆️
@modern-kit/utils 100.00% <100.00%> (ø)

Copy link
Contributor

@ssi02014 ssi02014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 작업 감사합니다 :)

@ssi02014 ssi02014 merged commit dc69e83 into modern-agile-team:main Oct 20, 2024
@github-actions github-actions bot mentioned this pull request Oct 20, 2024
@Sangminnn Sangminnn deleted the feat/findLastKey branch October 20, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 추가 @modern-kit/utils @modern-kit/utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants